<%@page import="kau.vo.AttendInfo"%>
<%@page import="kau.dao.CourseDAOImpl"%>
<%@page import="java.util.ArrayList"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>Insert title here</title>
<style type="text/css">
<!--
@import url("css/style.css");
-->
</style>
<script type="text/javascript">
	function showMonthlyList() {

		var selectedMonth = document.getElementById("selectedMonth").value;
		location.replace('/nems/AttendInfoAnalysis.attendInfo?selectedMonth='
				+ selectedMonth);
	}
</script>

<style type="text/css">
#info {
	font-family: 맑은 고딕, dotum, sans-serif, bold;
	font-size: 13px
}
</style>

</head>

<body>

	<div id="info">
		<table align="left" style="margin-left: 20px">

			<tr>
				<td><img src="/nems/attendInfo/img/checkin.png" width="40"
					alt="출결정보분석" /></td>

				<td>
					<h4
						style="font-weight: bold; color: #005700; text-align: left; font-size: 20px;">출결정보분석</h4>
				</td>
			</tr>

		</table>
		<br> <br> <br>

		
		<div align="center">
			달선택 <select onchange="showMonthlyList()" id="selectedMonth"
				name="selectedMonth">
				<option>선택하세요</option>
				<option value="all">전체보기</option>
				<c:forEach var='list' items="${requestScope.monthList}">
					<option value="${list}">${list}</option>
				</c:forEach>
			</select>
		</div>
	</div>
	<%	String selectedMonth=null;
	if(request.getAttribute("selectedMonth")!=null){
		selectedMonth= request.getAttribute("selectedMonth").toString();
	}%>
	
	<a href="attendInfo/excelDown.jsp?attendAnalysis=attendAnalysis&month=<%=selectedMonth%>">
	<img
		border="0" align="left"
		style="margin-left: 600px; margin-bottom: 20px;"
		src="/nems/attendInfo/img/excel_save.png"></a>
	<%
		session.setAttribute("attendInfoAnalysisList",request.getAttribute("attendInfoAnalysisList"));
	%>
	<table border='1' style="width: 100%" id="newspaper-a"
		summary="2007 Major IT Companies' Profit">

		<tr>
			<td>No.</td>
			<td>아이디</td>
			<td>회원이름</td>
			<td>결석</td>
			<td>조퇴</td>
			<td>지각</td>
			<td>지각+조퇴</td>
			<td>정상</td>
			<td>감점</td>
			<td>합계점수</td>

		</tr>
		<c:forEach var='list' varStatus="status"
			items="${requestScope.attendInfoAnalysisList}">
			<tr>
				<td><c:out value="${status.count}" /></td>
				<td>${list.custId}</td>
				<td>${list.custName}</td>
				<td>${list.absenceCnt}</td>
				<td>${list.earlyLeavingCnt}</td>
				<td>${list.lateCnt}</td>
				<td>${list.earlylateCnt}</td>
				<td>${list.nomalCnt}</td>
				<td>${list.attendGrade}</td>
				<td>${list.totalGrade}</td>

			</tr>
		</c:forEach>


	</table>

</body>
</html>